/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DatabaseAccess;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Sir Tam
 */
public class DBHelper01 
{    
    private static Connection conn = null;    
    
    /** Creates a new instance of DBHelper */
    public  Connection DBHelper01() 
    {
        if(conn == null)
        {
            try{               
                Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
                conn = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;user=sa;password=111189;database=QLK");
               
            }catch (ClassNotFoundException e){
                System.out.println(e);
            }catch (SQLException sql){
                System.out.println(sql);
            }            
        }
        return  conn;
    }
}
